package com.nansu.controller;

import com.nansu.entity.Student;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class MyFirstController {


    @RequestMapping("/c1/hello")
    public void hello(){
        System.out.println("你好！SpringMVC！");
    }

    @RequestMapping("/c1/param1")
    public void getParam(String username,int age){
        System.out.println(username);
        System.out.println(age);
    }


    @RequestMapping("/c1/param2")
    public void ObjParam(Student student){
        System.out.println(student);
    }

}
